﻿using Inovout.Web.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Inovout.Data.Domain;
using System.Web.Mvc;
using KuaJing.Orders.Domain;
using KuaJing.Common.Domain;

namespace KuaJing.Tasks.WebPages.Controllers
{
    public class FileController : RepositoryController<File>
    {
        public override ActionResult Index(QueryCriteria queryCriteria)
        {
            return View(ModelService.FindAll().OrderByDescending(m=>m.CreatedTime));
        }
        public ActionResult Download(File file)
        {
            return File(file.Name,"applicaton/stream",System.IO.Path.GetFileName(file.Name));
        }
    }
}